package cn.com.ustudy.course.study.model.entity;

import cn.melonlib.cores.commons.model.entity.TenantRecordEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = "LessonStudent")
@Table(name = "crs_study_lesson_student")
@ModelComment("班级学生")
public class LessonStudent extends TenantRecordEntity {

    @ManyToOne(cascade = CascadeType.REFRESH,fetch = FetchType.LAZY)
    @JoinColumn(name = "lesson_id")
    @ModelComment("所属班级")
    private Lesson lesson;

    @ModelComment("学生")
    private String student;
}
